import request from "@/utils/request";

//分页获取审批列表数据
export function reqApprovalList(params){
    return request({
        url:"/klApprovalConfigs/pages",
        method:"get",
        params:params
    })
}

//删除某条/多条审批列表数据
export function reqDelApproval(approvalIds){
    return request({
        url:"/klApprovalConfigs/ids",
        method:"delete",
        params:{
            ids:approvalIds
        }
    })
}

//根据id获取某条审批数据
export function reqApprovalById(approvalId){
    return request({
        url:"/klApprovalConfigs/" + approvalId,
        method:"get"
    
    })
}

//更新某条审批数据
export function reqUpdateApproval(approvalInfo){
    return request({
        url:"/klApprovalConfigs",
        method:"put",
        data:approvalInfo
    })
}

//生成审批编号
export function reqApprovalNumber(){
    return request({
        url:"/klApprovalConfigs/numberRule/getSeqByType?ruleType=approval",
        method:"get"
    })
}

//保存一条审批配置信息
export function reqSavePurchaseInventoryApprove(data){
    return request({
        url:"/klApprovalConfigs",
        method:"post",
        data:data
    })
}


//获取申请用户列表信息
export function reqApprovalUserList(params){
    return request({
        url:"/api/users/list",
        method:"get",
        params:params
    })
}